package jp.co.jbuy.common;

import java.util.ResourceBundle;



public class ResourceManager {
	
	private static ThreadLocal currentResourceBundle_ = new ThreadLocal();

    public static void setCurrentBundle(ResourceBundle resource ) {
        currentResourceBundle_.set(resource);
     }
    
    public static ResourceBundle getCurrentBundle() {
        return (ResourceBundle)currentResourceBundle_.get();
    }
    
	public static String getYahooClientId() {
		return getCurrentBundle().getString("yahoo_client_id");
	}
	
	public static String getYahooClientSecret() {
		return getCurrentBundle().getString("yahoo_client_secret");
	}
	
	public static String getYahooRedirectURL() {
		return getCurrentBundle().getString("yahoo_redirect_url");
	}
	
	public static String getYahooSearchReqUrl() {
		return getCurrentBundle().getString("yahoo_search_req_url");
	}
	
	public static String getSystemDefaultLanguage() {
		return getCurrentBundle().getString("system_default_language");
	}
	
	public static int getLanguageCookieAge() {
		int languageCookieAge=365;
		try{
			Integer.parseInt(getCurrentBundle().getString("language_cookie_age"));
		}
		catch(Exception ex){
			ex.printStackTrace();
		}
		return languageCookieAge;
	}
	



}